<template>
	<ul class="pagination">
	    <li><a href="javascript:;" @click="notifyNp(1)">&laquo;首页</a></li>
	    <li v-if="pageInfo.np-1>0"><a href="javascript:;" @click="notifyNp(pageInfo.np-1)">{{pageInfo.np-1}}</a></li>
	    <li class="active"><a href="javasript:;">{{pageInfo.np}}</a></li>
	    <li v-if="pageInfo.np+1<=pageInfo.page"><a href="javascript:;" @click="notifyNp(pageInfo.np+1)">{{pageInfo.np+1}}</a></li>
	    <li><a href="javascript:;" @click="notifyNp(pageInfo.page)">末页&raquo;</a></li>
	</ul> 
</template>

<script>
	export default {
		props: ['pageInfo'],
		methods: {
			notifyNp: function(np) {
				this.$dispatch('update-np', np);
			}
		}
	}
</script>

<style>
	
</style>